/*
 * @Author: Haochen
 * @Date: 2021-12-07 17:46:31
 * @LastEditTime: 2021-12-11 09:56:33
 * @FilePath: \students-system\src\api\modules\students.js
 */

import axios from 'axios';

export default {
  getStudents(params) {
    return axios({
      url: '/students/getStudents',
      method: 'GET',
      params,
    });
  },
  addStudent(data) {
    return axios({
      url: '/students/addStudents',
      method: 'POST',
      data,
    });
  },

  deleteStudent(data) {
    return axios({
      url: '/students/deleteStudents',
      method: 'DELETE',
      data,
    });
  },

  updateStudent(data) {
    return axios({
      url: '/students/updateStudents',
      method: 'PUT',
      data,
    });
  },

  getStudentById(params) {
    return axios({
      url: '/students/getStudentsById',
      method: 'GET',
      params,
    });
  },

  uploadStudentImg(data) {
    return axios({
      url: '/images/uploadImages',
      method: 'POST',
      data,
    });
  },
};
